<%content_for :title do %><%= document.title %> - <%= !document.author.nil? ? document.author.name : "" %><% end %>
<%content_for :description do %><%=t("site.meta_desc.document")+document.title + ". " + (document.description ? document.description : "")%><% end %>
<%content_for :keywords do %><%= document.tag_list %><% end %>
<%content_for :alternate_urls do%><%=raw alternate_urls(polymorphic_url(document), document)%><%end%>
<%content_for :canonical do%><%=polymorphic_url(document, :locale => params[:locale])%><%end%>

<% @contribution = (params["contribution"]=="true" and !document.contribution.nil?) %>

<section id="<%= document.class.to_s.underscore %> "class="layout_show">

  <% if @contribution %>
    <%= render :partial => 'application/breadcrumb_path', :locals  => { :path => document.contribution.parents_path } %>
  <% end %>

  <% document_profile_subject ||= document.owner_subject %>
  
  <!-- Recommendations -->
  <%= render :partial => 'recommender/sidebar', :locals  => {:resources => RecommenderSystem.resource_suggestions({:user => current_subject, :lo => document, :n=>10})} %>
  
  <div class="doc-show">
  
    <div class="box-show">
      <div class="viewerContainer">
        <div class="elementsBox">
          <%= render partial: "#{ document.class.to_s.tableize }/#{ document.class.to_s.underscore }_show",
            locals: { document.class.to_s.underscore.to_sym => document } %>
        </div>
      </div>
    </div>

    <div class="description-activity">
      <!--tool tab-->
      <div class="box_description">
        <div class="excursion_tool">
          <%= render :partial => 'common_documents/document-tool-tab', :locals => { :document => document } %>
        </div>
      </div>
      <!--activity-->
      <div class="activity-box">
        <%= render :partial => 'common_documents/activity', :locals => { :document => document } %>
      </div>
    </div>

  </div>

  <% if @contribution %>
    <%= render :partial => 'contributions/contributable_activity', :locals => { :contribution => document.contribution } %>
  <% end %>

</section>
